package com.eshop.modules.activity.service;

import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.eshop.modules.activity.service.dto.StoreBargainDto;
import java.util.Map;
import org.springframework.data.domain.Pageable;
import com.eshop.modules.activity.service.dto.StoreBargainQueryCriteria;
import com.eshop.modules.activity.vo.StoreBargainQueryVo;
import java.util.List;
import com.eshop.modules.activity.vo.BargainVo;
import com.eshop.modules.user.domain.ShopUser;
import com.eshop.modules.activity.vo.BargainCountVo;
import com.eshop.modules.activity.vo.TopCountVo;
import com.eshop.modules.activity.domain.StoreBargain;
import com.eshop.common.service.BaseService;

public interface StoreBargainService extends BaseService<StoreBargain>
{
    void incStockDecSales(final int num, final Long bargainId);
    
    void decStockIncSales(final int num, final Long bargainId);
    
    void doHelp(final Long bargainId, final Long bargainUserUid, final Long uid);
    
    TopCountVo topCount(final Long bargainId);
    
    BargainCountVo helpCount(final Long bargainId, final Long uid, final Long myUid);
    
    BargainVo getDetail(final Long id, final ShopUser shopUser);
    
    List<StoreBargainQueryVo> getList(final int page, final int limit);
    
    Map<String, Object> queryAll(final StoreBargainQueryCriteria criteria, final Pageable pageable);
    
    List<StoreBargain> queryAll(final StoreBargainQueryCriteria criteria);
    
    void download(final List<StoreBargainDto> all, final HttpServletResponse response) throws IOException;
    
    void deleteBargainImg(final String id);
}
